export default {
  //站点树
    loadSiteTreeServer(params, callback) {
        Vue.http.get('/site/listdata.json', { params: params }).then(function(response) {
            callback(response.data);
        });
    },
    // 添加站点
    addSiteServer(params, callback_success, callback_error) {
        Vue.http.post('/site/add.json', params).then(response => {
            callback_success(response.data);
        }, response => {
            callback_error(response.data)
        });
    },
    // 编辑站点
    editSiteServer(params, callback_success, callback_error) {
        Vue.http.put('/site/modify.json', params).then(response => {
            callback_success(response.data);
        }, response => {
            callback_error(response.data)
        });
    },
}
